# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=xdg-desktop-portal-wlr
pkgver=0.6.0
pkgrel=0
pkgdesc="wlroots implementation of xdg-desktop-portal"
url="https://github.com/emersion/xdg-desktop-portal-wlr"
# riscv64: blocked by xdg-desktop-portal
# s390x: blocked by pipewire, xdg-desktop-portal
arch="all !riscv64 !s390x"
license="MIT"
depends="xdg-desktop-portal"
makedepends="
	basu-dev
	inih-dev
	meson
	pipewire-dev
	scdoc
	wayland-protocols-dev
	wlroots-dev
	"
options="!check"  # no tests provided
subpackages="$pkgname-doc $pkgname-dbg"
source="https://github.com/emersion/xdg-desktop-portal-wlr/releases/download/v$pkgver/xdg-desktop-portal-wlr-$pkgver.tar.gz"

build() {
	abuild-meson build \
		-Dsd-bus-provider=basu
	meson compile ${JOBS:+-j ${JOBS}} -C build
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C build
	rm -rf "$pkgdir"/usr/lib/systemd
}

sha512sums="
e325c2de2a98ffc4612da3492138843b6c9927e536f52f7a87e794380c099f84ab8d344ee989bf88e71faaad2e5300fc31ac74058cea5040654ac74ce270ee53  xdg-desktop-portal-wlr-0.6.0.tar.gz
"
